package dataType;

public class ErrorData extends Exception{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String errorMsg;
	private StackTraceElement[] stackTrace;
	private String stackTraceMsg;
		
	public ErrorData() {
		super();
	}
	public ErrorData(String errorMsg) {
		super();
		this.errorMsg = errorMsg;
		this.stackTrace = super.getStackTrace();	
		this.stackTraceMsg = "";
		int i = 0;
		while(i < stackTrace.length){
			this.stackTraceMsg = stackTraceMsg + "\n"+stackTrace[i];	
			i++;
		}
	}
	
	public String getErrorMsg() {
		return errorMsg;
	}
	public void setErrorMsg(String errorMsg) {
		this.errorMsg = errorMsg;
	}
	public StackTraceElement[] getStackTrace() {
		return stackTrace;
	}
	public void setStackTrace(StackTraceElement[] stackTrace) {
		this.stackTrace = stackTrace;
	}
	public String getStackTraceMsg() {
		return stackTraceMsg;
	}
	public void setStackTraceMsg(String stackTraceMsg) {
		this.stackTraceMsg = stackTraceMsg;
	}	
	
}
